#include<iostream>

using namespace std;
template<class T1>
class Soure{
  public:
    void print();

  private:
    T1 _Math;
    T1 _Chinese;
    T1 _English;
};
template<class T1>
void Soure<T1>::print()
{

  cout << "数学:" << _Math << endl;
	cout << "语文:" << _Chinese << endl;
	cout << "英语:" << _English << endl;
}

template<class T>

void swap(const T& a,const T& b)
{
  T tmp = a;
  a= b;
  b=tmp;
}


int main()
{
  
  int a =10,b=20;
  double c = 7.9;
  double d = 4.5;
  swap(a,b);
  swap<int>(a,b);
  swap(c,d);
  cout<<"a="<<a<<"  ,"<<"b="<<b<<endl;
  cout<<"c="<<c<<"  ,"<<"d="<<d<<endl;
  Soure<int> s1;
  s1.print();
  return 0;
}
